<template>
  <div id="app">
      <app-header></app-header>
      <div>
        <router-view></router-view>
      </div>
      <app-footer></app-footer>
  </div>
</template>

<script>
import Header from './components/pulic/Header'
import Footer from './components/pulic/Footer'
export default {
  components:{
    appHeader: Header,
    appFooter: Footer
  },
  mounted() {
    this.$htRem()
		window.onresize = ()=>{
			this.$htRem()
		}
  },
  created(){
        if (window.sessionStorage.getItem("vuex") ) {
            this.$store.dispatch('changeSearch',JSON.parse(sessionStorage.getItem("vuex")))
        }
        window.addEventListener("beforeunload",()=>{
            window.sessionStorage.setItem("vuex",JSON.stringify(this.$store.state.searchList))
        })
    },
}
</script>


<style>
  body,html{
    width : 100%;
    height: 100%
  }
</style>

